﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Frame.Lib.Data;

namespace Frame.Lib.Core.Company
{
    public partial class CompanyInfo : EntityBase
    {
        public override string GetTableName()
        {
            return "s_Company";
        }
        public override string GetInsertSql()
        {
            return "insert into s_Company ( [ID], [Name], [LoginName], [Address], [ZipCode], [BankName], [BankAccount], [Telephone], [Mobile], [Fax], [Email], [QQ], [MSN], [ContactName], [SiteDomain], [SiteTitle], [SiteKeywords], [SiteDescriptions], [SiteIPC], [SiteIsAlone], [SiteIPCount], [SitePVCount], [ConnectionString]) values ( @ID, @Name, @LoginName, @Address, @ZipCode, @BankName, @BankAccount, @Telephone, @Mobile, @Fax, @Email, @QQ, @MSN, @ContactName, @SiteDomain, @SiteTitle, @SiteKeywords, @SiteDescriptions, @SiteIPC, @SiteIsAlone, @SiteIPCount, @SitePVCount, @ConnectionString)";
        }
        public override string GetUpdateSql()
        {
            return "update s_Company set  [ID] = @ID, [Name] = @Name, [LoginName] = @LoginName, [Address] = @Address, [ZipCode] = @ZipCode, [BankName] = @BankName, [BankAccount] = @BankAccount, [Telephone] = @Telephone, [Mobile] = @Mobile, [Fax] = @Fax, [Email] = @Email, [QQ] = @QQ, [MSN] = @MSN, [ContactName] = @ContactName, [SiteDomain] = @SiteDomain, [SiteTitle] = @SiteTitle, [SiteKeywords] = @SiteKeywords, [SiteDescriptions] = @SiteDescriptions, [SiteIPC] = @SiteIPC, [SiteIsAlone] = @SiteIsAlone, [SiteIPCount] = @SiteIPCount, [SitePVCount] = @SitePVCount, [ConnectionString] = @ConnectionString where ID = @ID";
        }
        /// <summary>
        /// 
        /// </summary>
        public Int32 ID
        {
            get;
            set;
        }
        /// <summary>
        /// 公司名称
        /// </summary>
        public String Name
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String LoginName
        {
            get;
            set;
        }
        /// <summary>
        /// 公司地址
        /// </summary>
        public String Address
        {
            get;
            set;
        }
        /// <summary>
        /// 邮编
        /// </summary>
        public String ZipCode
        {
            get;
            set;
        }
        /// <summary>
        /// 开户行
        /// </summary>
        public String BankName
        {
            get;
            set;
        }
        /// <summary>
        /// 开户行账号
        /// </summary>
        public String BankAccount
        {
            get;
            set;
        }
        /// <summary>
        /// 联系电话
        /// </summary>
        public String Telephone
        {
            get;
            set;
        }
        /// <summary>
        /// 联系手机
        /// </summary>
        public String Mobile
        {
            get;
            set;
        }
        /// <summary>
        /// 传真
        /// </summary>
        public String Fax
        {
            get;
            set;
        }
        /// <summary>
        /// 电子邮件
        /// </summary>
        public String Email
        {
            get;
            set;
        }
        /// <summary>
        /// QQ
        /// </summary>
        public String QQ
        {
            get;
            set;
        }
        /// <summary>
        /// MSN
        /// </summary>
        public String MSN
        {
            get;
            set;
        }
        /// <summary>
        /// 联系人
        /// </summary>
        public String ContactName
        {
            get;
            set;
        }
        /// <summary>
        /// 网站域名(唯一)
        /// </summary>
        public String SiteDomain
        {
            get;
            set;
        }
        /// <summary>
        /// 网站标题
        /// </summary>
        public String SiteTitle
        {
            get;
            set;
        }
        /// <summary>
        /// 网站关键字
        /// </summary>
        public String SiteKeywords
        {
            get;
            set;
        }
        /// <summary>
        /// 网站描述
        /// </summary>
        public String SiteDescriptions
        {
            get;
            set;
        }
        /// <summary>
        /// 网站备案
        /// </summary>
        public String SiteIPC
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public Boolean SiteIsAlone
        {
            get;
            set;
        }
        /// <summary>
        /// IP统计
        /// </summary>
        public Int32 SiteIPCount
        {
            get;
            set;
        }
        /// <summary>
        /// PV统计
        /// </summary>
        public Int32 SitePVCount
        {
            get;
            set;
        }
        /// <summary>
        /// 
        /// </summary>
        public String ConnectionString
        {
            get;
            set;
        }
        public override void SetValue(string key, object value)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    this.ID = (Int32)value;
                    break;
                case "name":
                    this.Name = (String)value;
                    break;
                case "loginname":
                    this.LoginName = (String)value;
                    break;
                case "address":
                    this.Address = (String)value;
                    break;
                case "zipcode":
                    this.ZipCode = (String)value;
                    break;
                case "bankname":
                    this.BankName = (String)value;
                    break;
                case "bankaccount":
                    this.BankAccount = (String)value;
                    break;
                case "telephone":
                    this.Telephone = (String)value;
                    break;
                case "mobile":
                    this.Mobile = (String)value;
                    break;
                case "fax":
                    this.Fax = (String)value;
                    break;
                case "email":
                    this.Email = (String)value;
                    break;
                case "qq":
                    this.QQ = (String)value;
                    break;
                case "msn":
                    this.MSN = (String)value;
                    break;
                case "contactname":
                    this.ContactName = (String)value;
                    break;
                case "sitedomain":
                    this.SiteDomain = (String)value;
                    break;
                case "sitetitle":
                    this.SiteTitle = (String)value;
                    break;
                case "sitekeywords":
                    this.SiteKeywords = (String)value;
                    break;
                case "sitedescriptions":
                    this.SiteDescriptions = (String)value;
                    break;
                case "siteipc":
                    this.SiteIPC = (String)value;
                    break;
                case "siteisalone":
                    this.SiteIsAlone = (Boolean)value;
                    break;
                case "siteipcount":
                    this.SiteIPCount = (Int32)value;
                    break;
                case "sitepvcount":
                    this.SitePVCount = (Int32)value;
                    break;
                case "connectionstring":
                    this.ConnectionString = (String)value;
                    break;
            }
        }
        public override object GetValue(string key)
        {
            key = key.ToLower();
            switch (key)
            {
                case "id":
                    return this.ID;
                case "name":
                    return this.Name;
                case "loginname":
                    return this.LoginName;
                case "address":
                    return this.Address;
                case "zipcode":
                    return this.ZipCode;
                case "bankname":
                    return this.BankName;
                case "bankaccount":
                    return this.BankAccount;
                case "telephone":
                    return this.Telephone;
                case "mobile":
                    return this.Mobile;
                case "fax":
                    return this.Fax;
                case "email":
                    return this.Email;
                case "qq":
                    return this.QQ;
                case "msn":
                    return this.MSN;
                case "contactname":
                    return this.ContactName;
                case "sitedomain":
                    return this.SiteDomain;
                case "sitetitle":
                    return this.SiteTitle;
                case "sitekeywords":
                    return this.SiteKeywords;
                case "sitedescriptions":
                    return this.SiteDescriptions;
                case "siteipc":
                    return this.SiteIPC;
                case "siteisalone":
                    return this.SiteIsAlone;
                case "siteipcount":
                    return this.SiteIPCount;
                case "sitepvcount":
                    return this.SitePVCount;
                case "connectionstring":
                    return this.ConnectionString;
                default:
                    return null;
            }
        }
    }


}
